import { configureStore } from '@reduxjs/toolkit'
import { useSelector, TypedUseSelectorHook, useDispatch, shallowEqual } from 'react-redux'
import musicReducer from './modules/music'
const store = configureStore({
  reducer: {
    musicReducer
  }
})
export default store

export type StateType = ReturnType<typeof store.getState>
export const useAppSelector: TypedUseSelectorHook<StateType> = useSelector

export type DispatchType = typeof store.dispatch
export const useAppDispatch: () => DispatchType = useDispatch

export const appShallowEqual = shallowEqual
